import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Date;

/**
 * @author 赵希奥
 * @date 2022/3/31 20:51
 * @gitHub https://github.com/CKXGZXA
 * @gitee https://gitee.com/ckxgzxa
 * @description: 日志记录类, 充当子系统类
 */
public class Logger {
    public void log() {
        // 记录用户登录时间、登录地址等
        System.out.println("登录时间: " + new Date());
        try {
            System.out.println("登录ip地址: " + InetAddress.getLocalHost().getHostAddress());
        } catch (UnknownHostException e) {
            e.printStackTrace();
        }
    }
}
